<?php
namespace app\model;

class AiRole extends BaseModel
{
    protected $name = 'ai_roles';
    
    protected $autoWriteTimestamp = true;
    
    // 时间字段转换
    protected $type = [
        'create_time' => 'integer',
        'update_time' => 'integer',
        'delete_time' => 'integer'
    ];

    /**
     * 关联用户
     */
    public function user()
    {
        return $this->belongsTo(User::class);
    }
} 